import tensorflow as tf

# 创建张量
tensor = tf.constant([[1, 2], [3, 4]])

# 运算
result = tf.reduce_sum(tensor)
print("Sum:", result.numpy())